package com.nowcoder.service;

import com.nowcoder.dao.LoginTicketDAO;
import com.nowcoder.model.LoginTicket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Andy on 2017/2/27.
 */

@Service
public class LoginTicketService {
    @Autowired
    LoginTicketDAO loginTicketDAO;

    public int addTicket(LoginTicket ticket) {
        return loginTicketDAO.addTicket(ticket);
    }

    public LoginTicket selectByTicket(String ticket) {
        return loginTicketDAO.selectByTicket(ticket);
    }

    public void updateStatus(String ticket,int status) {
        loginTicketDAO.updateStatus(ticket,status);
    }
}
